import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login')
  },
  {
    path: '',
    name: '',
    component: () => import('@/views/Layout'),
    children: [
      {
        path: '/',
        name: 'home',
        meta: [
          { name: '首页', url: '/home' }
        ],
        component: () => import('@/views/Home')
      },
      {
        path: '/life_and_death/users',
        name: 'users',
        meta: [
          { name: '生死溥', url: '/life_and_death/users' }
        ],
        component: () => import('@/views/Users')
      },
      {
        path: '/Audit',
        name: 'audit',
        meta: [
          { name: '勾魂管理', url: '/Audit' }
        ],
        component: () => import('@/views/Audit')
      },
      {
        path: '/audit_record',
        name: 'audit_record',
        meta: [
          { name: '阎王殿审判记录', url: '/audit_record' }
        ],
        component: () => import('@/views/AuditRecord')
      },
      {
        path: '/hell/equipment',
        name: 'equipment',
        meta: [
          { name: '十八层地狱', url: '' },
          { name: '设备管理', url: '/hell/equipment' }
        ],
        component: () => import('@/views/Equipment')
      },
      {
        path: '/Again/Return',
        name: 'return',
        meta: [
          { name: '六道轮回', url: '/Again/Return' }
        ],
        component: () => import('@/views/Return')
      },
      {
        path: '/money',
        name: 'money',
        meta: [
          { name: '冥币管理', url: '/money' }
        ],
        component: () => import('@/views/Money')
      },
      {
        path: '/log',
        name: 'log',
        meta: [
          { name: '日志管理', url: '/log' }
        ],
        component: () => import('@/views/Log')
      },
      {
        path: '/system/role',
        name: 'role',
        meta: [
          { name: '角色权限', url: '/system/role' }
        ],
        component: () => import('@/views/Role')
      },
      {
        path: '/system/Administrator',
        name: 'adminlist',
        meta: [
          { name: '管理员管理', url: '/system/Administrator' }
        ],
        component: () => import('@/views/Administrator')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
